package com.bw.liuyushan.liuyushan20210904.Utils;

import com.blankj.utilcode.util.NetworkUtils;

/**
 * Liuyushan20210904
 * file name is : MyNetWorkUtils
 * created by Ender on 2021/9/4 8:53.
 * author : 刘雨杉
 * Describe:双重单列锁网络判断工具类
 */
public class MyNetWorkUtils {

    private static MyNetWorkUtils myNetWorkUtils;

    public static MyNetWorkUtils getInstance() {
        if (myNetWorkUtils==null){
            synchronized (MyNetWorkUtils.class){
                if (myNetWorkUtils==null){
                    myNetWorkUtils=new MyNetWorkUtils();
                }
            }
        }
        return myNetWorkUtils;
    }
    public boolean isHasNetWorkUtils(){
        return NetworkUtils.isAvailableByPing();
    }
}
